import { createRouter, createWebHistory } from 'vue-router'
import Layout from '@/layout/index.vue'
import Login from '@/views/login/index.vue'
// import type component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs'
// import { flattedChildren } from 'element-plus/es/utils/index.mjs'
// 为什么要用路由懒加载？当需要组件时再加载

const routes = [
  {
    path: '/',
    component: Layout,
  },
  {
    path: '/login',
    component:Login
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
})



export default router
